package com.cn.thread;

/**
 * @author hels
 * @version 1.0
 * @date 2022/3/7 17:04
 */
public class T2Runnable implements Runnable {

    public static void main(String[] args) {
        T2Runnable runnable = new T2Runnable();

        Thread thread1 = new Thread(runnable,"二");
        Thread thread2 = new Thread(runnable,"线程");

        thread1.start();
        thread2.start();
    }

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName() + "-" + i);
        }
    }
}
